#include <iostream>
#include <string>
#include <unistd.h>

using namespace std;

class Furniture {
private:
    int weight;

public:
    void setWeight(int weight) {
        this->weight = weight;
    }

    int getWeight() const {
        return weight;
    }
};

class Sofa : virtual public Furniture {
public:
    void watchTV(void) {
        cout << "watch TV" << endl;
    }
};

class Bed : virtual public Furniture {
public:
    void sleep(void) {
        cout << "sleep" << endl;
    }
};

class SofaBed : public Sofa, public Bed {

};

int main() {
    SofaBed s;
    s.watchTV();
    s.sleep();

    s.setWeight(100);
    cout << s.getWeight() << endl;

    return 0;
}
